Relay device

ABSTRACT

A relay device in a communication network includes: a configuration determination unit determining whether a configuration frame is received; a comparison unit; first and second configuration units; and a configuration transfer unit. The comparison unit determines whether the propagation number at reception time is equal to the total number of target devices in a configuration frame. When the propagation number is not equal to the total number, the first configuration unit sets a port in the transfer destination information to the mirror output port. When the propagation number is not equal to the total number, the configuration transfer unit outputs the updated configuration frame from the mirror input port. When the propagation number is equal to the total number, the second configuration unit sets a port in the transfer destination information to the mirror output port.

CROSS REFERENCE TO RELATED APPLICATION

The present application claims the benefit of priority from JapanesePatent Application No. 2018-43033 filed on Mar. 9, 2018. The entiredisclosure of the above application is incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to a relay device configuring acommunication network.

BACKGROUND

The configuration that any of multiple relay devices performs portmirroring, and a frame mirrored by the port mirroring (that is,replicated) is transferred to a monitoring device of the frame throughone or more other relay devices is referred to herein as remotemonitoring.

Regarding the remote monitoring, a tunnel for transferring a mirrorframe from a switch that has performed port mirroring to a measurementdevice connected to another switch is configured by distributing a labeltable to each switch as multiple relay devices from a management server.The mirror frame is a mirrored frame. The tunnel is considered tocorrespond to a transfer path of the mirror frame.

SUMMARY

According to an aspect of the present disclosure, a relay device as eachof a plurality of relay devices in a communication network, includes: aconfiguration determination unit configured to determine whether aconfiguration frame is received; a comparison unit; a firstconfiguration unit; a configuration transfer unit; and a secondconfiguration unit. The comparison unit determines whether thepropagation number at reception time is equal to the total number oftarget devices in a configuration frame. When the propagation number isnot equal to the total number, the first configuration unit sets a portin the transfer destination information to the mirror output port. Whenthe propagation number is not equal to the total number, theconfiguration transfer unit outputs the updated configuration frame fromthe mirror input port. When the propagation number is equal to the totalnumber, the second configuration unit sets a port in the transferdestination information to the mirror output port.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, features and advantages of the presentdisclosure will become more apparent from the following detaileddescription made with reference to the accompanying drawings. In thedrawings:

FIG. 1 is a configuration diagram showing a communication network inwhich a switch is used as a relay device according to an embodiment;

FIG. 2 is an illustrative diagram of a table showing a configuration ofremote monitoring;

FIG. 3 is an illustrative diagram illustrating a configuration of aframe;

FIG. 4 is a flowchart showing a configuration process for remotemonitoring; and

FIG. 5 is a flowchart showing a transfer control process for remotemonitoring.

DETAILED DESCRIPTION

Embodiments of the present disclosure will be described below withreference to the drawings.

Regarding remote monitoring, a tunnel for transferring a mirror framefrom a switch that has performed port mirroring to a measurement deviceconnected to another switch is configured by distributing a label tableto each switch as multiple relay devices from a management server. Themirror frame is a mirrored frame. The tunnel is considered to correspondto a transfer path of the mirror frame.

In the above feature, it is not clear how the remote monitoringconfiguration for each switch (that is, each relay device) is performedby information from the management server.

The configuration related to remote monitoring is the configuration ofat least the following items (1) to (4).

(1) Item as to which relay device among the multiple relay devicesconfigures the mirror execution device. The mirror execution device is arelay device that implements the port mirroring.

(2) Item as to which port is used as a monitor port and which port isused as a mirror output port in the mirror execution device. The monitorport is a port subject to port mirroring. The mirror output port is aport (that is, mirror port) for outputting the mirror frame.

(3) Item as to which relay device among the multiple relay devicesserves as the mirror transfer device. The mirror transfer device is arelay device that transfers the mirror frame from the mirror executiondevice to a monitoring device.

(4) Item as to which port is the mirror input port and which port is themirror output port in the mirror transfer device. The mirror input portis a port to which the mirror frame is input from another relay device.

It is an object of the present disclosure to provide a new techniquewhich is capable of facilitating the configuration for remotemonitoring.

According to an aspect of the present disclosure, a relay device as eachof a plurality of relay devices in a communication network, includes: aconfiguration determination unit configured to determine whether aconfiguration frame is received; a comparison unit; a firstconfiguration unit; a configuration transfer unit; and a secondconfiguration unit. The configuration frame provides to transfer amirror frame from one of the relay devices to a monitor device viaanother one of the relay devices. The mirror frame is duplicated byexecuting a port mirroring in the one of the relay devices. The one ofthe relay devices executing the port mirroring is defined as anexecution relay device. The other one of the relay devices disposed in atransfer path between the execution relay device and the monitor deviceand transferring the mirror frame is defined as a transfer relay device.Each of the execution relay device and the transfer relay device isdefined as a target relay device. One of the target relay devicesinitially connecting to the monitor device is defined as a first-stagerelay device. The configuration frame is initially input into thefirst-stage relay device, and propagates through each target device. Theconfiguration frame includes a configuration information region forstoring a propagation number information, a total number of the targetdevices, a transfer destination information and a transfer sourceinformation. The propagation number information indicates a numericalnumber of propagations as a numerical number of target devices to whichthe configuration frame has propagated. The configuration framepropagates in a propagation order of the target devices. The first-stagerelay device has a first order of the propagation order. The transferdestination information and the transfer source information relates tothe target devices in the propagation order in association with eachpropagation order. The transfer destination information indicates anmirror output port that outputs the mirror frame to be transferred tothe monitoring device. The transfer source information recorded inassociation with a same order of the propagation order as the totalnumber of the target devices indicates a monitor port as an object ofthe port mirroring. The transfer source information recorded inassociation with an order of the propagation order smaller than thetotal number of the target devices indicates a mirror input port towhich the mirror frame is input from the other one of the relay devices.The comparison unit determines whether the numerical number ofpropagations at reception time is equal to the total number of thetarget devices in a received configuration frame when the configurationdetermination unit determines that the configuration frame is received.The numerical number of propagations at the reception time is indicatedby the propagation number information in the received configurationframe. When the comparison unit determines that the numerical number ofpropagations at the reception time is not equal to the total number ofthe target devices, the first configuration unit: sets the relay deviceto function as the transfer relay device; sets a port indicated in thetransfer source information to be the mirror input port when thetransfer source information and the transfer destination information inthe configuration information region of the configuration frame areassociated with the same order of the propagation order as the numericalnumber of propagations at the reception time; and sets a port indicatedin the transfer destination information to be the mirror output port.When the comparison unit determines that the numerical number ofpropagations at the reception time is not equal to the total number ofthe target devices, the configuration transfer unit: updates thepropagation number information in the configuration frame to be newpropagation number information indicating the numerical number ofpropagations incremented by 1 from the numerical number of propagationsat the reception time; and outputs the configuration frame after thepropagation number information is updated from the port set as themirror input port by the first configuration unit. When the comparisonunit determines that the numerical number of propagations at thereception time is equal to the total number of the target devices, thesecond configuration unit: sets the relay device to function as theexecution relay device; sets a port indicated in the transfer sourceinformation to be the monitor port when the transfer source informationand the transfer destination information in the configurationinformation region of the configuration frame are associated with thesame order of the propagation order as the numerical number ofpropagations at the reception time; and sets a port indicated in thetransfer destination information to be the mirror output port.

The configuration determination unit determines whether or not theconfiguration frame has been received.

The configuration frame is a frame for allowing the mirror frameduplicated by the port mirroring performed by any of the multiple relaydevices to be transferred to the monitoring device 30 through anotherrelay device. The other relay device referred to herein is a relaydevice that is not a relay device that has performed the port mirroring.The monitoring device is a device for monitoring the mirror frame. Inother words, the configuration frame is a frame for configurationrelated to remote monitoring.

The configuration frame is first input to a first stage device, which isa target device to which the monitoring device is connected, of targetdevices, which are an execution device as the relay device that performsthe port mirroring, and a transfer device as a relay device that existsin a transfer path between the execution device and a monitoring deviceand transfers the mirror frame from the execution device. Theconfiguration frame is propagated to each target device. The propagationof the configuration frame to each target device is realized by aconfiguration transfer unit which will be described later. The executiondevice corresponds to the mirror execution device described above, andthe transfer device corresponds to the mirror transfer device describedabove.

The configuration frame records the propagation number informationindicating the number of propagations as the number of target devices towhich the configuration frame has propagated and the total number oftarget devices, and includes the configuration information region.

In the configuration information region, the transfer destinationinformation and the transfer source information about the target deviceshaving the propagation order are recorded in association with each ofthe propagation orders, which are the order of the target devices towhich the configuration frame is propagated, with the first stage deviceas a first order.

The transfer destination information indicates a port to which themirror frame is to be output in order to transfer the mirror frame tothe monitoring device, that is, the mirror output port.

Among the transfer source information, the transfer source informationrecorded in association with the same number of propagation orders asthe total number indicates a port to be subjected to the port mirroring,that is, the monitor port. Among the transfer source information, thetransfer source information recorded in association with the propagationorder of a number smaller than the total number indicates a port towhich the mirror frame is input from another relay device, that is, themirror input port.

Then, in the relay device, when an affirmative determination is made bythe configuration determination unit, that is, when it is determinedthat the configuration frame is received, the comparison unit determineswhether or not the number of propagation at the time of reception, whichis the number of propagations indicated by the propagation numberinformation in the received configuration frame, is equal to the totalnumber in the received configuration frame. Note that “in theconfiguration frame” means “recorded in the configuration frame”.

The first configuration unit sets the relay device so as to function asthe transfer device when a negative determination is made by thecomparison unit, that is, when it is determined that the total number isnot equal to the number of propagations at the time of reception.Further, the first configuration unit sets a port indicated by thetransfer source information as the mirror input port in the relaydevice, among the transfer destination information and the transfersource information associated with the same number of propagation ordersas the number of propagations at the time of reception in theconfiguration information region of the received configuration frame,and sets a port indicated by the transfer destination information as amirror output port in the relay device. The first configuration unitperforms the configuration of the items (3) and (4). The expression“associated with the propagation order” means “recorded corresponding tothe propagation order”.

When the comparison unit makes the negative determination, theconfiguration transfer unit updates the propagation number informationin the received configuration frame to the propagation numberinformation indicating the number of propagations incremented by 1 fromthe number of propagations at the time of reception, and outputs theconfiguration frame after the propagation number information is updatedfrom the port set as the mirror input port by the first configurationunit. The configuration transfer unit realizes the propagation of theconfiguration frame between the target devices.

The second configuration unit sets the relay device so as to function asthe execution device when the comparison unit makes the affirmativedetermination, that is, when the total number and the number ofpropagations at the time of reception are determined to be equal to eachother. Further, the second configuration unit sets a port indicated bythe transfer source information as the monitor port in the relay device,and sets a port indicated by the transfer destination information as themirror output port in the relay device among the transfer destinationinformation and the transfer source information associated with the samenumber of propagation orders as the number of propagations at the timeof reception in the configuration information region of the receivedconfiguration frame. The second configuration unit performs theconfiguration of the above items (1) and (2).

According to the relay device configured as described above, when theconfiguration frame is input to any port of the relay device which hasbecome the first stage device, the configuration frame is propagated tothe relay device which is the execution device, and the configuration ofthe above items (1) to (4) is completed. Therefore, configurationrelated to remote monitoring becomes easy. Incidentally, the propagationnumber information in the configuration frame input to the first stagedevice may be set to the propagation number information indicating 1,which means the first propagation, as the number of propagations.

1. Configuration

A communication network 1 according to an embodiment shown in FIG. 1 is,for example, an Ethernet network mounted on a vehicle such as apassenger car, and configures a communication system in the vehicle.Ethernet is a registered trademark.

As shown in FIG. 1, a communication network 1 includes Ethernet switches11 to 15 (hereinafter referred to as a switch), which are Ethernetnetwork switches, as multiple relay devices. In FIG. 1 and other figuresto be described later, the switch is referred to as “SW”. The number ofswitches may be other than five.

Among the switches 11 to 15, the switch 11 is built in an electroniccontrol device (hereinafter referred to as an ECU) 20. The ECU is anabbreviation for “Electronic Control Unit”. The communication network 1includes ECUs 21 to 26 as devices that communicate through any one ormore of the switches 11 to 15.

The switches 11 to 15 are, for example, layer 2 switches (that is, L2switches), and perform a communication for relaying in accordance withthe Ethernet standard. Each of the switches 11 to 15 includes multiple(for example, eight) ports P0 to P7. In the communication network 1, atleast one of the multiple ports P0 to P7 included in each of theswitches 11 to 15 is connected to a port of another switch.

The ECU 21 is connected to the port P2 of the switch 11 through acommunication line 41. The ECU 22 is connected to the port P7 of theswitch 12 through a communication line 42. The ECU 23 is connected tothe port P7 of the switch 14 through a communication line 43. The ECU 24is connected to the port P5 of the switch 14 through a communicationline 44. The ECU 25 is connected to the port P4 of the switch 15 througha communication line 45. The ECU 26 is connected to the port P4 of theswitch 13 through a communication line 46.

The port P6 of the switch 11 and the port P1 of the switch 12 areconnected to each other through a communication line 47. The port P6 ofthe switch 12 and the port P1 of the switch 14 are connected to eachother through a communication line 48. The port P5 of the switch 12 andthe port P1 of the switch 15 are connected to each other through acommunication line 49. The port P5 of the switch 11 and the port P1 ofthe switch 13 are connected to each other through a communication line50.

A microcomputer 10 (hereinafter referred to as a microcomputer) as anarithmetic device provided in the ECU 20 is connected to the ports P0 ofthe switch 11. For that reason, the microcomputer 10 of the ECU 20 cancommunicate with the ECU 21 through the switch 11. The microcomputer 10can also communicate with the ECUs 22 to 26 through the switch 11 andany one or more of the other switches 12 to 15. Though not shown, eachof the ECUs 21 to 26 is also provided with a microcomputer as anarithmetic device. The microcomputer includes semiconductor memories(hereinafter referred to as memory) such as a CPU, a ROM, and a RAM.

A monitoring device 30 for monitoring a frame flowing through thecommunication network 1 is detachably connected to an end of thecommunication line 51 connected to the port P1 of the switch 11.

2. Table Showing Configuration of Remote Monitoring

In the communication network 1, a remote monitoring is performed.

A configuration of the remote monitoring, that is, a configuration of atransfer path between the switch 11 connected with the monitoring device30 is connected and the switch for performing the port mirroring(hereinafter referred to as a mirror execution switch) can be regardedas a tree configuration starting from the switch 11. For that reason,the configuration of the remote monitoring can be represented by a tableshown in FIG. 2 (a tabular database). Hereinafter, a switch that relaysthe mirror frame transmitted by the mirror execution switch to themonitoring device 30 is referred to as a mirror transfer switch. Themirror execution switch corresponds to an execution device, and themirror transfer switch corresponds to a transfer device. When theswitches 11 to 15, the ports P0 to P7, the ECUs 20 to 26, and the likeare not particularly distinguished from each other, the referencenumerals will be omitted.

A table of FIG. 2 will be described.

A term “hop” means the number of hops. If n is an integer of 1 or more,“hop=n” means that the number of hops is n. Here, the number of hopsindicates the order of the switches in which the frame input to theswitch 11 propagates with the switch 11 connected to the monitoringdevice 30 as the first, in other words, indicates the order ofconnection of each switch with the switch 11 as the first. The switch 11corresponds to a first stage device, and the number of hops correspondsto the propagation order.

In the table of FIG. 2, the information recorded on a right side of anECU name in each row numbered 1, 2, 3, . . . at a left end isconfiguration information indicating the configuration of remotemonitoring in the case where each ECU is a target of remote monitoring.A symbol EOF is a mark indicating an end of the content of theconfiguration information. That is, in each row of the table, theinformation recorded from the total number of hops to the immediatelypreceding EOF, that is, the left side, is substantial configurationinformation.

The total number of hops is the number of switches present between thetarget ECU and the monitoring device 30. In other words, the totalnumber of hops is the number of switches (hereinafter referred to asconfiguration target switches) to be configured for remote monitoring.To describe the configuration target switch, first, the switch to whichthe target ECU is connected becomes the mirror execution switch. Theswitch existing in the transfer path between the mirror execution switchand the monitoring device 30 serves as a mirror transfer switch. Each ofthe mirror execution switch and the mirror transfer switch becomes theconfiguration target switch. The configuration target switch correspondsto the target device, and the total number of hops corresponds to thetotal number of target devices.

In each row of the table of FIG. 2, before EOF, a transfer destinationport corresponding to the transfer destination information and atransfer source port corresponding to the transfer source informationare recorded for each number of hops. Each of the transfer destinationport and the transfer source port to be recorded is actually the numberof the corresponding port (for example, 0 to 7). Also, in FIG. 2, theport is described as “port”.

The number of hops equal to the total number of hops is the number ofhops of the mirror execution switch. For that reason, in each row of thetable of FIG. 2, the transfer destination port and the transfer sourceport recorded in association with the number of hops equal to the totalnumber of hops are the transfer destination port and the transfer sourceport for the mirror execution switch.

The number of hops smaller than the total number of hops is the numberof hops of the mirror transfer switch. For that reason, in each row ofthe table of FIG. 2, the transfer destination port and the transfersource port recorded in association with the number of hops smaller thanthe total number of hops are the transfer destination port and thetransfer source port for the mirror transfer switch.

Among the transfer source ports recorded in the table of FIG. 2, thetransfer source port recorded in association with the number of hopsequal to the total number of hops indicates a monitor port, and thetransfer source port recorded in association with the number of hopssmaller than the total number of hops indicates a mirror input port. Asdescribed above, the monitor port is a port to be subjected to portmirroring, and the mirror input port is a port to which the mirror frameis input from another switch. The monitor port is also a port to whichthe target ECU is connected.

The transfer destination port recorded in the table of FIG. 2 indicatesa mirror output port. In other words, in the mirror execution switch,the transfer destination port is a port for outputting a mirror frameduplicated by the switch to be transferred to the monitoring device 30,and in the mirror transfer switch, the transfer destination port is aport for outputting a mirror frame from another switch to be transferredto the monitoring device 30.

In each row of the table of FIG. 2, I/O information indicates whetherthe port mirroring to be executed is the reception mirror or thetransmission mirror. The reception mirror is to mirror the framereceived from the monitor port, that is, the frame transmitted by thetarget ECU. The transmission mirror mirrors a frame transmitted from themonitor port, that is, a frame transmitted to the target ECU. As the I/Oinformation, a symbol “I” shown in FIG. 2 indicates the receptionmirror. If the I/O information is the transmission mirror, the I/Oinformation becomes “O”, for example.

For example, when it is considered that remote monitoring is performedby the reception mirror with the ECU 23 as a target, the configurationinformation of the remote monitoring is the configuration informationshown in a third row in the table of FIG. 2, that is, a row having theleftmost number of 3. In the configuration information of the thirdline, the switches 11, 12, and 14 are specified as the configurationtarget switches based on a connection relationship between the transferdestination port and the transfer source port recorded for each numberof hops. It is indicated that the port P7 of the third switch 14 havingthe first switch 11 is the monitor port of the reception mirror, and theport P1 of the switch 14 is the mirror output port. Further, it isindicated that the port P6 of the second switch 12 is a mirror inputport and the port P1 of the switch 12 is a mirror output port, and thatthe port P6 of the switch 11 is a mirror input port and the port P1 ofthe switch 11 is a mirror output port.

The table of FIG. 2 is recorded in a memory (for example, a ROM) of themicrocomputer 10.

3. Configuration Frame

The microcomputer 10 transmits a configuration frame in order to performconfiguration related to remote monitoring. The configuration frametransmitted from the microcomputer 10 is input to the port PD of theswitch 11, and then propagated to each of the configuration targetswitches including the switch 11. The configuration frame will bedescribed with reference to FIG. 3.

First, a normal frame (hereinafter referred to as a normal frame), whichis not a configuration frame, will be described. The normal frame is anormal Ethernet frame.

As shown in the first stage of FIG. 3, the normal frame includes fieldsof an Ethernet header, a type, an Ethernet payload, and an FCS. Thesource MAC address (that is, a transmission source MAC address) isstored at an end of the Ethernet header. An Ethernet payload is a bodyof data that is transferred in a frame. A symbol FCS is an abbreviationfor “Frame Check Sequence”.

On the other hand, as shown in the second row of FIG. 3, in theconfiguration frame, a field is added at a predetermined position incomparison with the normal frame. A field added to the normal frame iscalled a unique field. The unique field is added, for example, betweenthe Ethernet header and the type field, that is, between the source MACaddress and the type field.

In the unique field of the configuration frame, an identifier(hereinafter referred to as a configuration identifier), which is a codeof one or more bits indicating that the frame is the configurationframe, and a security key for authentication are recorded. The securitykey is a mufti-bit code for verifying that the configuration frame is aframe transmitted from a normal device, that is, the microcomputer 10 inthe present embodiment.

The Ethernet payload of the configuration frame stores the configurationinformation recorded for the ECU which is the target of remotemonitoring among the configuration information recorded for each ECU inthe table of FIG. 2. Incidentally, the configuration frame shown in FIG.3 is a configuration frame when remote monitoring is performed by thereception mirror with the ECU 23 as a target.

Further, the hop number count value is recorded at a predeterminedposition in the Ethernet payload of the configuration frame. In thepresent embodiment, the hop number count value is recorded between thetotal number of hops and the I/O information.

The hop number count value indicates the number of configuration targetswitches (that is, the number of propagations) through which theconfiguration frame has propagated. In the present embodiment, the hopnumber count value indicates the propagation number as it is, but it issufficient if there is a one-to-one correspondence between the hopnumber count value and the number of propagations. The hop number countvalue in the configuration frame output from the microcomputer 10 is setto a value indicating a first propagation, that is, 1 in the presentembodiment.

The hop number count value corresponds to the propagation numberinformation. In the following description, as shown in FIG. 3, an regionin which a transfer destination port corresponding to “the number ofhops=1” to a transfer source port corresponding to the same number ofhops as the total number of hops are recorded in the Ethernet payload ofthe configuration frame is referred to as a configuration informationregion. In the above configuration information region, the transferdestination port and the transfer source port of the configurationtarget switch corresponding to the number of hops are recorded inassociation with each hop number from 1 to the same number as the totalnumber of hops.

4. Processing

Next, processing performed by each of the switches 11 to 15 inconnection with remote monitoring will be described with reference toFIGS. 4 and 5.

[4-1. Configuration Process]

First, a configuration process performed by each of the switches 11 to15 for executing a configuration in the switch based on theconfiguration frame from the microcomputer 10 will be described withreference to FIG. 4. In FIG. 4, the hop number count value is simplydescribed as a count value.

When a frame is received from any of the ports P0 to P7, the switchperforms the configuration process of FIG. 4.

As shown in FIG. 4, in S110, the switch determines whether or not thereceived frame (hereinafter referred to as a received frame) is aconfiguration frame, that is, whether or not the configuration frame hasbeen received. Specifically, the switch determines whether or not theunique field is added to the received frame and the configurationidentifier is recorded in the unique field. If the configurationidentifier is recorded in the unique frame, that is, if theconfiguration identifier is included in the received frame, the switchdetermines that the configuration frame has been received.

When it is determined in S110 that the configuration frame has not beenreceived, the switch proceeds to S220, and performs a process ofrelaying the received frame as the normal frame. In other words, anormal relay process is performed on the received frame. Thereafter, theswitch ends the configuration process.

When it is determined in S110 that the configuration frame has beenreceived, the switch proceeds to S115 and performs an authenticationprocess using a security key included in the configuration frame. Forexample, the switch performs a predetermined calculation on the securitykey included in the configuration frame, and if the calculation resultis a correct value, the switch determines that the authentication hassucceeded, and if the calculation result is not a correct value, theswitch determines that the authentication has failed.

In a next S117, the switch determines whether or not the authenticationhas succeeded by the authentication process in S115, and if theauthentication has not succeeded, the switch discards the receivedconfiguration frame in S119, and then ends the configuration process.

If it is determined in S117 that the authentication has succeeded in theauthentication process, the switch proceeds to S120 and acquiresinformation from the received configuration frame. Specifically, theswitch acquires the total number of hops, the hop number count value,and the I/O information from the configuration frame. Further, theswitch acquires the transfer destination port and the transfer sourceport recorded corresponding to the number of hops equal to the hopnumber count value from the configuration information region in theconfiguration frame. The hop number count value acquired from theconfiguration frame in S120 corresponds to the number of propagations atthe time of reception.

In a next S130, the switch determines whether or not the total number ofhops and the hop number count value acquired in S120 are equal to eachother, and if it is determined that the total number of hops and the hopnumber count value are equal to each other, the switch proceeds to S140.

In S140, the switch is configured so that the switch functions as themirror execution switch. For example, the switch sets a flag indicatingthat the switch functions as the mirror execution switch. Further, inS140, the switch sets the transfer source port acquired in S120 as themonitor port in the switch, and sets the transfer destination portacquired in S120 as the mirror output port in the switch.

In a next S5150, the switch configures the reception mirror or thetransmission mirror based on the I/O information acquired in S120.Specifically, if the I/O information acquired from the configurationframe is “I” indicative of the reception mirror, the switch performs theconfiguration of executing the reception mirror as the port mirroring,and if the I/O information is “O” indicative of the transmission mirror,the switch performs the configuration of executing the transmissionmirror as the port mirroring. After performing the processing of S150,the switch proceeds to S170.

When it is determined by the switch in S130 that the total number ofhops is not equal to the hop number count value, the process proceeds toS160.

In S160, the switch is set so that the switch functions as a mirrortransfer switch. For example, the switch sets a flag indicating that theswitch functions as the mirror transfer switch. Further, in S160, theswitch sets the transfer source port acquired in S120 as the mirrorinput port in the switch, and sets the transfer destination portacquired in S120 as the mirror output port in the switch. Afterperforming the processing of S160, the switch proceeds to S170.

In S170, the switch determines whether or not the hop number count valueacquired in S120 is 1, and if the hop number count value is 1, it isrecognized that the switch is a switch (that is, the switch 11)connected to the monitoring device 30, and the process proceeds to S180.

In S180, the switch performs a configuration in which the mirroridentifier is unnecessary. For example, the switch sets a flagindicating that no mirror identifier is required. The switch thenproceeds to S190. The mirror identifier is a code of one or more bitsinserted into the mirror frame and indicates that the frame is a mirrorframe. Whether or not it is configured that the mirror identifier isunnecessary in S180 is determined in S350 and S410 of FIG. 5, which willbe described later.

When it is determined in S170 that the hop number count value is not 1,the switch directly proceeds to S190.

In S190, the switch determines whether or not the total number of hopsacquired in S120 is equal to the hop number count value, similarly toS130. Since the determination result in S130 is the same as thedetermination result in S190, the determination result in S130 may bereferred to in S190.

When it is determined in S190 that the total number of hops and the hopnumber count value are not equal to each other, the switch proceeds toS200 and increments the hop number count value acquired in S120 by 1. Ina next S210, the switch updates the hop number count value in thereceived configuration frame to a value incremented by 1, and outputs(that is, transmits) the configuration frame after the hop number countvalue has been updated from the port set as the mirror input port inS160. Thereafter, the switch ends the configuration process.

If it is determined in S190 that the total number of hops is equal tothe hop number count value, the switch ends the configuration process asit is.

[4-2. Transfer Control Process]

Next, a transfer control process performed by each of the switches 11 to15 for remote monitoring will be described with reference to FIG. 5.

After receiving the configuration frame and performing the processing ofS120 and subsequent steps in the configuration processing of FIG. 4, theswitch performs the transfer control process of FIG. 5 when receivingthe frame from any of the ports P0 to P7.

As shown in FIG. 5, in S310, the switch determines whether or not theswitch is set to function as the mirror execution switch by theconfiguration process of FIG. 4, and if it is determined that the switchis set to function as the mirror execution switch, the process proceedsto S320.

In S320, the switch performs a process of relaying the received frame asthe normal frame. In other words, a normal relay process is performed onthe received frame.

After the relay process has been performed in S320, the switch proceedsto S330, and determines whether or not the port mirroring is performed.Specifically, when the configuration in S150 of FIG. 4 is the receptionmirror and the frame is received from the monitor port set in S140 ofFIG. 4, or when the configuration in S150 of FIG. 4 is the transmissionmirror and the received frame is transmitted from the monitor port setin S140 of FIG. 4, the port mirroring is determined to be performed.

When it is determined in S330 that the port mirroring is not to beperformed, the switch ends the transfer control process as it is, butwhen it is determined in S330 that the port mirroring is to beperformed, the switch proceeds to S340.

In S340, when the configuration in S150 of FIG. 4 is the receptionmirror, that is, when the reception mirror is implemented as the portmirroring, the switch creates a frame obtained by duplicating thereceived frame from the monitor port as the mirror frame.

When the configuration in S150 of FIG. 4 is a transmission mirror, thatis, when the transmission mirror is implemented as the port mirroring,the switch creates a frame obtained by duplicating the frame transmittedfrom the monitor port as a mirror frame. Since the frame transmittedfrom the monitor port is the same as the received frame when thetransmission mirror is implemented, in S440, the frame obtained byduplicating the received frame may be created as the mirror frame evenwhen the transmission mirror is executed.

In a next S350, the switch determines whether or not the mirroridentifier unnecessity has been configured in S180 of FIG. 4. Then, ifthe mirror identifier unnecessity has not been configured, that is, ifthe switch is not the switch 11, the switch proceeds to S360.

In S360, the switch adds the unique field shown in FIG. 3 to the mirrorframe created in S340. In addition, the switch records the mirroridentifier in the added unique field. That is, the configurationidentifier and the security key are not recorded in the unique fieldadded to the mirror frame, but the mirror identifier is recorded. Then,in a next S370, the switch outputs (that is, transmits) the mirror frameto which the unique field including the mirror identifier is added fromthe mirror output port set in S140 of FIG. 4, and then ends the transfercontrol process.

For that reason, the mirror frame to which the unique field includingthe mirror identifier has been added is transferred from the mirrorexecution switch to another switch (that is, the mirror transfer switch)on the side where the connection order is close to the monitoring device30.

When it is determined in S350 that the mirror identifier unnecessity hasbeen configured in S180 of FIG. 4, the switch proceeds to S370 withoutperforming the processing of S360. Then, in S370 in this case, theswitch outputs the mirror frame to which the unique field is not addedfrom the mirror output port set in S140 of FIG. 4, and then ends thetransfer control process.

The switch that proceeds from S350 to S370 is the switch 11 that is themirror execution switch. In other words, when the switch 11 is a mirrorexecution switch, the process proceeds from S350 to S370, and the switchoutputs a mirror frame to which a unique field is not added to themonitoring device 30.

On the other hand, if the switch determines in S310 that the switch isnot configured to function as the mirror execution switch, the processadvances to S380.

In S380, the switch determines whether or not the switch is configuredto function as the mirror transfer switch by the configuration processof FIG. 4, and if it is determined that the switch is configured tofunction as the mirror transfer switch, the process proceeds to S390.

In S390, the switch determines whether or not the frame has beenreceived from the mirror input port set in S160 of FIG. 4, and if it isdetermined that the frame has been received from the mirror input port,the switch proceeds to S400.

In S400, the switch determines whether or not the mirror identifier isincluded in the received frame from the mirror input port. Specifically,the switch determines whether or not the unique field is inserted in thereceived frame and whether or not the mirror identifier is included inthe unique field.

When it is determined in S400 that the received frame includes themirror identifier, the switch determines that the mirror frame has beenreceived from the mirror input port, and proceeds to S410.

In S410, like S350, the switch determines whether or not the mirroridentifier unnecessity has been configured in S180 of FIG. 4. If themirror identifier unnecessity has been set, that is, if the switch isthe switch 11, the switch proceeds to S420.

In S420, the switch deletes the unique field from the reception mirrorframe, and makes a form of the mirror frame equal to that of the normalframe. With the deletion of the unique field, the mirror identifier isalso deleted. Then, in a next S430, the switch outputs (that is,transmits) the mirror frame from which the unique field has been deletedfrom the mirror output port configured in S140 of FIG. 4, and then endsthe transfer control process.

For that reason, the mirror frame transferred from the other switch tothe switch 11 is transferred to the monitoring device 30 after theunique field has been deleted by the switch 11, that is, after themirror frame has been returned to the normal frame.

When it is determined in S410 that the mirror identifier unnecessity isnot configured in S180 of FIG. 4, that is, when the switch is the mirrortransfer switch but not the switch 11, the switch proceeds to S430without performing the processing in S420. Then, in S430 in this case,the switch outputs the mirror frame with the unique field added as it isfrom the mirror output port set in S140 of FIG. 4, and then ends thetransfer control process.

For that reason, the mirror frame to which the unique field has beenadded is transferred from the mirror transfer switch which is not theswitch 11 to another switch on the side where the connection order isclose to the monitoring device 30.

On the other hand, if the switch determines in S380 that the switch isnot configured to function as the mirror transfer switch, the processadvances to S440. Then, in S440, similarly to S320, the switch performsthe normal relay process on the received frame, and then ends thetransfer control process.

When it is determined in S390 that the frame has not been received fromthe mirror input port, or when it is determined in the above S400 thatthe mirror identifier is not included in the received frame, the switchalso proceeds to S 440, and then ends the transfer control process.

The processing of FIGS. 4 and 5 may be performed by one or multiplehardware included in the switch. For example, the hardware thatimplements the processes of FIGS. 4 and 5 may be implemented by adigital circuit or an analog circuit, or a combination of the digitalcircuit with the analog circuit. In addition, the switch may include amicrocomputer, and a part or all of the processing of FIGS. 4 and 5 maybe performed by the microcomputer. In that case, a part or all of thefunctions of the switch are realized by the CPU of the microcomputerexecuting a program stored in a non-transitory tangible storage medium.In this example, the memory corresponds to a non-transitory tangiblestorage medium in which the program is stored. When the execution of theprogram, a method corresponding to the program is executed.

5. Operation Example

Next, an operation example in which the switches 11 to 15 perform theprocessing of FIGS. 4 and 5 will be described.

In the communication network 1 shown in FIG. 1, for example, an examplein which the remote monitoring is executed by the reception mirror withthe ECU 23 connected to the switch 14 as a target, that is, the frametransmitted from the ECU 23 is monitored by the monitoring device 30will be described.

In this instance, the microcomputer 10 in the ECU 20 transmits theconfiguration frame illustrated in FIG. 3 to the switch 11. As describedabove, the microcomputer 10 sets the hop number count value in theconfiguration frame to 1.

The switch 11 receives the configuration frame from the microcomputer10, and performs the configuration process of FIG. 4. In theconfiguration process of FIG. 4, the switch 11 makes the determinationof “YES” in S110 and S117, Then, in S120, the switch 11 acquires, fromthe configuration information region of the configuration frame, thetransfer destination port and the transfer source port recordedcorresponding to the number of hops (that is, “the number of hops=1”) ofthe same number as the hop number count value in the configurationframe. For that reason, the switch 11 acquires the port P1 as thetransfer destination port and acquires the port P6 as the transfersource port.

The switch 11 makes the determination of “NO” in S130, and configuresthe switch 11 to function as the mirror transfer switch in S160.Further, in S160, the switch 11 sets the port P6 acquired as thetransfer source port as the mirror input port, and sets the port P1acquired as the transfer destination port as the mirror output port.

In addition, the switch 11 makes the determination of “YES” in S170, andperforms a configuration in which the mirror identifier is unnecessaryin S180. Then, the switch 11 makes the determination of “NO” in S190,and outputs the configuration frame in which the hop number count valueis incremented by 1 from the port P6 set as the mirror input port by theprocessing of S200 and S210. The configuration frame output from theport P6 of the switch 11, in which the hop number count value is updatedto 2, is received by the switch 12.

The switch 12 receives the configuration frame from the switch 11, andperforms the configuration process of FIG. 4.

Similarly to the switch 11, the switch 12 also performs thedetermination of “YES” in S110 and S117 in the configuration process ofFIG. 4. Then, in S120, the switch 12 also acquires, from theconfiguration information region of the configuration frame, thetransfer destination port and the transfer source port recordedcorresponding to the number of hops (that is, “the number of hops=2”) ofthe same number as the hop number count value in the configurationframe. For that reason, the switch 12 acquires the port P1 as thetransfer destination port and acquires the port P6 as the transfersource port.

Similarly to the switch 11, the switch 12 also makes the determinationof “NO” in S130, and configures the switch 12 to function as the mirrortransfer switch in S160. Further, in S160, the switch 12 configures theport P6 acquired as the transfer source port as the mirror input port,and configures the port P1 acquired as the transfer destination port asthe mirror output port.

On the other hand, the switch 12 makes the determination of “NO” inS170. For that reason, the switch 12 does not configure the mirroridentifier unnecessity.

Then, the switch 12 makes the determination of “NO” in S190, and outputsthe configuration frame in which the hop number count value isincremented by 1 from the port P6 configured as the mirror input port bythe processing in S200 and S210. The configuration frame output from theport P6 of the switch 12, in which the hop number count value is updatedto 3, is received by the switch 14.

The switch 14 receives the configuration frame from the switch 12, andperforms the configuration process of FIG. 4.

Similarly to the switches 11 and 12, the switch 14 also makes thedetermination of “YES” in S110 and S117 in the configuration process ofFIG. 4. Then, in S120, the switch 14 also acquires, from theconfiguration information region of the configuration frame, thetransfer destination port and the transfer source port recorded incorrespondence with the number of hops (that is, “the number of hops=3”)of the same number as the hop number count value in the configurationframe. For that reason, the switch 14 acquires the port P1 as thetransfer destination port and acquires the port P7 as the transfersource port.

Meanwhile, in order to receive a configuration frame in which the hopnumber count value is equal to the total number of hops, the switch 14makes the determination of “YES” in S130 and configures the switch 12 tofunction as the mirror execution switch in S140. Further, in S140, theswitch 14 configures the port P7 acquired as the transfer source port asthe monitor port, and configures the port P1 acquired as the transferdestination port as the mirror output port. In the example of FIG. 3,since the I/O information included in the configuration frame is “I”,the switch 14 performs the configuration of executing the receptionmirror as the port mirroring in S150.

Similarly to the switch 12, the switch 14 makes the determination of“NO” in S170. For that reason, the switch 14 does not configure themirror identifier unnecessity.

In order to make the determination of “YES” in S190, the switch 14terminates the configuration process of FIG. 4 without transferring theconfiguration frame to another switch.

Therefore, when the microcomputer 10 transmits the configuration frameexemplified in FIG. 3, the configuration frame propagates in the statedorder of the switch 11, the switch 12, and the switch 14 as indicated byan arrow Y1 of a dashed line in FIG. 1. The switches 11, 12, and 14 areconfigured as follows.

The switch 14 is set as the port mirroring and as the mirror executionswitch that implements the reception mirror. The switch 11 and theswitch 12 are set as mirror transfer switches.

In the switch 14, the port P7 to which the ECU 23 is connected is set asa monitor port, and the port P1 to which the switch 12 is connected isset as the mirror output port.

In the switch 12, the port P6 to which the port P1 of the switch 14 isconnected is set as the mirror input port, and the port P1 to which theswitch 11 is connected is set as the mirror output port.

In the switch 11, the port P6 to which the port P1 of the switch 12 isconnected is set as the mirror input port, and the port P1 to which themonitoring device 30 is connected is set as the mirror output port.

In other words, the mirror frame mirrored by the switch 14 is set to betransferred to the monitoring device 30 through the switch 12 and theswitch 11.

Among the switches 11, 12, and 14, the switch 11 to which the monitoringdevice 30 is connected is configured so that the mirror identifier isunnecessary.

Next, it is assumed that the ECU 23 transmits a frame destined for theECU 24, for example, after configured as described above.

The frame transmitted by the ECU 23 is input to the ports P7 of theswitch 14. Then, the switch 14 that has received the frame from the ECU23 makes the determination of “yes” in S310 of FIG. 5, and transmits theframe (that is, the normal frame) from the ECU 23 from the port P5 inS320 of FIG. 5, thereby transferring the frame to the ECU 24. In FIG. 1,a solid arrow Y1 indicates that the normal frame is relayed from the ECU23 to the ECU 24.

Since the switch 14 is configured to implement the reception mirror asthe port mirroring and receives the frame from the port P7 configured asthe monitor port, the switch 14 makes the determination of “YES” in S330of FIG. 5. In other words, the switch 14 determines the execution of theport mirroring.

Therefore, in S340 of FIG. 5, the switch 14 creates a frame obtained byduplicating the received frame from the port P7 as the mirror frame.Then, the switch 14 makes the determination of “NO” in S350 of FIG. 5,and adds a unique field including the mirror identifier to the mirrorframe in S360 of FIG. 5. Further, in S370 of FIG. 5, the switch 14outputs the mirror frame to which the unique field is added from theport P1 set as the mirror output port.

The mirror frame output from the port P1 of the switch 14 is input tothe port P6 of the switch 12.

The switch 12 that has received the mirror frame from the switch 14makes the determination of “NO” in S310 of FIG. 3, and makes thedetermination of “YES” in S380 of FIG. 3. Further, the switch 12determines “YES” in both S390 and S400 of FIG. 5. That is, the switch 12determines that the mirror frame has been received from the port P6 setas the mirror input port.

The switch 12 outputs a mirror frame received from the switch 14, thatis, a mirror frame with the unique field added, from the port P1configured as the mirror output port in S430 of FIG. 5 in order to makethe determination of “NO” in S410 of FIG. 5.

The mirror frame output from the port P1 of the switch 12 is input tothe port P6 of the switch 11.

The switch 11 that has received the mirror frame from the switch 12makes the determination of “NO” in S310 of FIG. 3, and makes thedetermination of “YES” in S380 of FIG. 3. Further, the switch 11 makesthe determination of “YES” in both of S390 and S 400 of FIG. 5. In otherwords, similarly to the switch 12, the switch 11 also determines thatthe mirror frame has been received from the port P6 configured as themirror input port.

The switch 12 makes the determination of “NO” in S410 of FIG. 5 whereasthe switch 11 makes the determination of “YES” in S410 of FIG. 5. Forthat reason, in S420 of FIG. 5, the switch 11 deletes the unique fieldfrom the reception mirror frame. Then, in S430 of FIG. 5, the switch 11outputs the mirror frame from which the unique field is deleted, thatis, the mirror frame in the same form as the normal frame, from the portP1 configured as the mirror output port.

The mirror frame output from the port P1 of the switch 11 is input tothe monitoring device 30. The monitoring device 30 monitors the mirrorframe. In FIG. 1, a dotted arrow Y2 indicates that the mirror frame istransferred from the switch 14 to the monitoring device 30 through theswitch 12 and the switch 11.

6. Advantages

According to the switches 11 to 15 of the embodiment described in detailabove, the following advantages are obtained.

(a) Since the switches 11 to 15 perform the configuration process ofFIG. 4, when a configuration frame is input to any port of the switch 11to which the monitoring device 30 is connected, the configuration frameis propagated to the switch serving as the mirror execution switch, andthe configuration of the above items (1) to (4) is completed. Therefore,configuration related to remote monitoring becomes easy. Note that S110corresponds to the processing as the configuration determination unit. S130 and S190 correspond to the processing as the comparison unit. S 160corresponds to the processing as the first configuration unit. StepsS200 and S210 correspond to processing as the configuration transferunit. S 140 corresponds to processing as the second configuration unit.

(b) Since the switches 11 to 15 perform the transfer control processshown in FIG. 5, remote monitoring based on the configuration contentcan be performed according to the configuration process shown in FIG. 4.Note that S330 to S370 correspond to the processing as the mirrorexecution unit. Steps S390 and S 400 correspond to the processing as thereception determination unit. Steps S 410 to S 430 correspond to theprocessing as the mirror transfer unit.

(c) When the switch functions as the mirror execution switch, the switchadds the unique field to the mirror frame and records the mirroridentifier in the unique field in S360 of FIG. 5. When the switchfunctions as the mirror transfer switch, the switch determines whetheror not the mirror frame has been received based on whether or not themirror identifier is included in the received frame in S400 of FIG. 5.If the hop number count value in the received configuration frame is 1,the switch deletes the unique field from the reception mirror frame inS420 of FIG. 5 when the switch functions as the mirror transfer switch.Then, the switch that has performed the processing of S420 outputs themirror frame from which the unique field has been deleted, from the portconfigured as the mirror output port.

Therefore, the switch functioning as the mirror transfer switch caneasily determine whether or not the received frame is the mirror framebased on the mirror identifier, and can transfer the mirror frame of thesame format as that of the normal frame to the monitoring device 30.

(d) The unique field to be added is a field provided between the sourceMAC address and the type field in the Ethernet frame. For that reason,the mirror identifier can be included in the mirror frame withoutaffecting the Ethernet protocol.

(e) The configuration frame includes the configuration identifier. Then,in S110 of FIG. 4, the switch determines whether or not theconfiguration frame has been received based on whether or not theconfiguration identifier is included in the received frame. For thatreason, the switch can easily determine whether or not the frame is aconfiguration frame.

(f) In the configuration frame, the configuration identifier is placedin the field added between the source MAC address and the type field(that is, the unique field). For that reason, the configurationidentifier can be included in the configuration frame without affectingthe Ethernet protocol.

The configuration frame includes the security key for authentication.Then, in the configuration processing of FIG. 4, when it is determinedthat the configuration frame has been received, the switch performs theauthentication process using the security key in the authenticationframe in S115, and when it is determined that the authentication is notsuccessful by the authentication process in S117, the switch discardsthe configuration frame in S119. For that reason, the configurationrelated to the remote monitoring can be prevented from being performedby the configuration frame from an unauthorized device. Note that S115to S119 correspond to processing as the authentication unit.

7. Other Embodiments

Although the embodiments of the present disclosure have been describedabove, the present disclosure is not limited to the embodimentsdescribed above, and various modifications can be made to implement thepresent disclosure.

For example, the communication protocol may be other than Ethernet. Ifonly one of the reception mirror and the transmission mirror isimplemented, I/O information may not be included in the configurationframe.

In addition, a plurality of functions including one component in theabove embodiment may be realized by a plurality of components, or afunction of one component may be realized by a plurality of components.In addition, a plurality of functions including a plurality ofcomponents may be realized by one component, or a function realized by aplurality of components may be realized by one component. In addition, apart of the configuration of the above embodiment may be omitted. Inaddition to the switches described above, the present disclosure can berealized in various forms such as a system including the switch as acomponent, a program for causing a computer to function as the switch, anon-transitory tangible recording medium such as a semiconductor memoryin which the program is recorded, and a setting method of remotemonitoring.

The electronic control device as controllers and methods described inthe present disclosure may be implemented by a special purpose computercreated by configuring a memory and a processor programmed to executeone or more particular functions embodied in computer programs.Alternatively, the electronic control device as controllers and methodsdescribed in the present disclosure may be implemented by a specialpurpose computer created by configuring a processor provided by one ormore special purpose hardware logic circuits. Alternatively, theelectronic control device as controllers and methods described in thepresent disclosure may be implemented by one or more special purposecomputers created by configuring a combination of a memory and aprocessor programmed to execute one or more particular functions and aprocessor provided by one or more hardware logic circuits. The computerprograms may be stored, as instructions being executed by a computer, ina tangible non-transitory computer-readable medium.

It is noted that a flowchart or the processing of the flowchart in thepresent application includes sections (also referred to as steps), eachof which is represented, for instance, as S110. Further, each sectioncan be divided into several sub-sections while several sections can becombined into a single section. Furthermore, each of thus configuredsections can be also referred to as a device, module, or means.

While the present disclosure has been described with reference toembodiments thereof, it is to be understood that the disclosure is notlimited to the embodiments and constructions. The present disclosure isintended to cover various modification and equivalent arrangements. Inaddition, while the various combinations and configurations, othercombinations and configurations, including more, less or only a singleelement, are also within the spirit and scope of the present disclosure.

What is claimed is:
 1. A relay device as each of a plurality of relaydevices in a communication network, comprising: a configurationdetermination unit configured to determine whether a configuration frameis received; a comparison unit; a first configuration unit; aconfiguration transfer unit; and a second configuration unit, wherein:the configuration frame provides to transfer a mirror frame from one ofthe relay devices to a monitor device via another one of the relaydevices; the mirror frame is duplicated by executing a port mirroring inthe one of the relay devices; the one of the relay devices executing theport mirroring is defined as an execution relay device; the other one ofthe relay devices disposed in a transfer path between the executionrelay device and the monitor device and transferring the mirror frame isdefined as a transfer relay device; each of the execution relay deviceand the transfer relay device is defined as a target relay device; oneof the target relay devices initially connecting to the monitor deviceis defined as a first-stage relay device; the configuration frame isinitially input into the first-stage relay device, and propagatesthrough each target device; the configuration frame includes aconfiguration information region for storing a propagation numberinformation, a total number of the target devices, a transferdestination information and a transfer source information; thepropagation number information indicates a numerical number ofpropagations as a numerical number of target devices to which theconfiguration frame has propagated; the configuration frame propagatesin a propagation order of the target devices; the first-stage relaydevice has a first order of the propagation order; the transferdestination information and the transfer source information relates tothe target devices in the propagation order in association with eachpropagation order; the transfer destination information indicates anmirror output port that outputs the mirror frame to be transferred tothe monitoring device; the transfer source information recorded inassociation with a same order of the propagation order as the totalnumber of the target devices indicates a monitor port as an object ofthe port mirroring; the transfer source information recorded inassociation with an order of the propagation order smaller than thetotal number of the target devices indicates a mirror input port towhich the mirror frame is input from the other one of the relay devices;the comparison unit determines whether the numerical number ofpropagations at reception time is equal to the total number of thetarget devices in a received configuration frame when the configurationdetermination unit determines that the configuration frame is received;the numerical number of propagations at the reception time is indicatedby the propagation number information in the received configurationframe; when the comparison unit determines that the numerical number ofpropagations at the reception time is not equal to the total number ofthe target devices, the first configuration unit: sets the relay deviceto function as the transfer relay device; sets a port indicated in thetransfer source information to be the mirror input port when thetransfer source information and the transfer destination information inthe configuration information region of the configuration frame areassociated with the same order of the propagation order as the numericalnumber of propagations at the reception time; and sets a port indicatedin the transfer destination information to be the mirror output port;when the comparison unit determines that the numerical number ofpropagations at the reception time is not equal to the total number ofthe target devices, the configuration transfer unit: updates thepropagation number information in the configuration frame to be newpropagation number information indicating the numerical number ofpropagations incremented by 1 from the numerical number of propagationsat the reception time; and outputs the configuration frame after thepropagation number information is updated from the port set as themirror input port by the first configuration unit; and when thecomparison unit determines that the numerical number of propagations atthe reception time is equal to the total number of the target devices,the second configuration unit: sets the relay device to function as theexecution relay device; sets a port indicated in the transfer sourceinformation to be the monitor port when the transfer source informationand the transfer destination information in the configurationinformation region of the configuration frame are associated with thesame order of the propagation order as the numerical number ofpropagations at the reception time; and sets a port indicated in thetransfer destination information to be the mirror output port.
 2. Therelay device according to claim 1, further comprising: a mirrorexecution unit that is configured: to perform the port mirroring on aport which is set as the monitor port by the second configuration unitwhen the relay device is set to function as the execution relay deviceby the second configuration unit; and to output the mirror frameduplicated by the port mirroring from the port set as the mirror outputport by the second configuration unit; a reception determination unitthat is configured to determine whether the mirror frame is receivedfrom the port set as the mirror input port by the first configurationunit when the relay device is set to function as the transfer relaydevice by the first configuration unit; and a mirror transfer unit thatis configured to output a received mirror frame from the port set as themirror output port by the first configuration unit when the receptiondetermination unit determine that the mirror frame is received from theport set as the mirror input port.
 3. The relay device according toclaim 2, wherein: the mirror execution unit is configured to add a fieldat a predetermined position in a duplicated mirror frame, and to recorda mirror identifier, which indicates that the frame is a mirror frame,in an added field, and the reception determination unit is configured todetermine whether the mirror frame is received based on determinationwhether the mirror identifier is included in a received frame.
 4. Therelay device according to claim 3, wherein: the mirror transfer unit isconfigured to delete the added field from the received mirror frame, andto output the mirror frame, from which the field is deleted, from theport set as the mirror output port when the numerical number ofpropagations at the reception time is
 1. 5. The relay device accordingto claim 3, wherein: the relay device is an Ethernet relay device; andthe added field is disposed between a source MAC address and a typefield in an Ethernet frame.
 6. The relay device according to claim 1,wherein: the configuration frame includes a configuration identifierwhich indicates that the frame is the configuration frame; and theconfiguration determination unit is configured to determine whether theconfiguration frame is received based on determination whether theconfiguration identifier is included in the received frame.
 7. The relaydevice according to claim 6, wherein: the relay device is an Ethernetrelay device; and the configuration identifier is disposed in a fieldadded between the source MAC address and the type field in the Ethernetframe.
 8. The relay device according to claim 1, further comprising: anauthentication unit that is configured to perform an authenticationprocess using a security key for authentication when the configurationdetermination unit determines that the configuration frame is received,and to discard the received configuration frame when authentication isnot successful in the authentication process, wherein: the configurationframe includes the security key for authentication.